<?php 
	session_start();
	//if (!isset($_SESSION['login'])) Header("Location:../../index.php");
        require_once('../controllers/UIs/UIUsuario.php');
?>
<!--?xml version="1.0"?!-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="cs" lang="cs">
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <meta http-equiv="content-language" content="cs" />
    <meta name="robots" content="all,follow" />

    <meta name="author" content="All: ... [Nazev webu - www.url.cz]; e-mail: info@url.cz" />
    <meta name="copyright" content="Design/Code: Vit Dlouhy [Nuvio - www.nuvio.cz]; e-mail: vit.dlouhy@nuvio.cz" />
    
    <title>ASODECO encuestas</title>
    <meta name="description" content="..." />
    <meta name="keywords" content="..." />
    
    <link rel="index" href="./" title="Home" />
    <link rel="stylesheet" media="screen,projection" type="text/css" href="../../resources/css/main.css" />
    <link rel="stylesheet" media="print" type="text/css" href="../../resources/css/print.css" />
    <link rel="stylesheet" media="aural" type="text/css" href="../../resources/css/aural.css" />

    <script type="text/javascript">
    function confirmarEliminacion(pagina) {

        if(confirm("¿Esta seguro de querer eliminar al usuario?")) {

            document.location.href= pagina;

        }

    }
    </script>
</head>

<body id="www-url-cz">

<!-- Main -->
<div id="main" class="box">

    <!-- Header -->
    <div id="header">

        <!-- Logotyp -->
        <h1 id="logo"><!a href="./" title="Crystal X [Go to homepage]">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong>ASODECO </strong><span></span><!/a></h1>
        <hr class="noscreen" />          

        <!-- Quick links -->
        <div class="noscreen noprint">
            <p><em>Quick links: <a href="#content">content</a>, <a href="#tabs">navigation</a>, <a href="#search">search</a>.</em></p>
            <hr />
        </div>

    </div> <!-- /header -->

     <!-- Main menu (tabs) -->
     <div id="tabs" class="noprint">

            <h3 class="noscreen">Navigation</h3>
            <ul class="box">
                <li><a href="../../index.php">Inicio<span class="tab-l"></span><span class="tab-r"></span></a></li>
                <li><a href="empresas.php">Empresas<span class="tab-l"></span><span class="tab-r"></span></a></li>
                <li><a href="instrumentos.php">Instrumentos<span class="tab-l"></span><span class="tab-r"></span></a></li> 
                <li><a href="aplicaciones.php">Aplicaciones<span class="tab-l"></span><span class="tab-r"></span></a></li>
                <li><a href="resultados.php">Resultados<span class="tab-l"></span><span class="tab-r"></span></a></li>
                <li id="active"><a href="usuarios.php">Usuarios<span class="tab-l"></span><span class="tab-r"></span></a></li>
                <li><a href="config.php">Configuración<span class="tab-l"></span><span class="tab-r"></span></a></li>
                <li><a href="sync.php">Sincronizar<span class="tab-l"></span><span class="tab-r"></span></a></li>
            </ul>

        <hr class="noscreen" />
     </div> <!-- /tabs -->

    <!-- Page (2 columns) -->
    <div id="page" class="box">
    <div id="page-in" class="box">

        <?php $usu = obtenerUsuT();?>

        <!-- Content -->
        <div id="content">

            <!-- Article -->
            <div class="article">
                <h2><span>Listado de Usuarios</span></h2>
              <br />                
                <p class="info noprint">
                    <span class="date"><b>Fecha</b></span><span class="noscreen">,</span>&nbsp;&nbsp;&nbsp;
                    <span class="cat"><b>login</b></span><span class="noscreen">,</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	                <span class="comments"><b>Nombre Completo</b></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    &nbsp;&nbsp;&nbsp;
                    <span class="user"><b>Registrado por:</b></span><span class="noscreen">,</span>&nbsp;&nbsp;
                </p>
                <table border="0" width="100%">
                     <?php if ($usu != false)
                             foreach ($usu as $valor){
								 $usuario = 	obtenerUsuarioI($valor->id_usuario) ?>
                           
						<tr>
                        	<td width="17%"><?php echo $valor->fecha_mod ?></td>
                        	<td width="22%"><a href="modificarUsuario.php?id=<?php echo $valor->id?>"><?php echo $valor->login ?></a></td>
                        	<td ><?php echo $valor->nombre . " " . $valor->apellido ?>  </td>
		                   	<td width="15%"><?php echo $usuario->login ?></td>
                            <td width="5%"><p class="delete"><a href="javascript: confirmarEliminacion('eliminarUsuario.php?id=<?php echo $valor->id?>')"></a></p></td>
                        </tr>
                    	<tr>
	                        <td colspan="5"><p class="info noprint"> </p></td>
                        </tr>                                 
                      <?php      }
                     ?>
                </table>
                <p class="btn-more box noprint"><strong><a href="insertarUsuario.php">Agregar</a></strong></p>
            </div> <!-- /article -->

            <hr class="noscreen" />
            
        </div> <!-- /content -->

        <!-- Right column -->
        <div id="col" class="noprint">
            <div id="col-in">

                <!-- About Me -->
			<?php if (isset($_SESSION['login'])) { ?>
                <h3><span>Acerca de M&iacute;</span></h3>
                <div id="about-me">
                    <strong><?php echo $_SESSION['user_name'] ?></strong><br />
                    <?php echo $_SESSION['user_email'] ?><br />
                    Caracas, VEN<br /><br />
                    <a href="../controllers/logout.php">Cerrar Sesi&oacute;n</a></p>
                </div> <!-- /about-me -->
			 <?php } ?>

                <hr class="noscreen" />


                

                <hr class="noscreen" />
            
            </div> <!-- /col-in -->
        </div> <!-- /col -->

    </div> <!-- /page-in -->
    </div> <!-- /page -->

    <!-- Footer -->
    <div id="footer">
        <div id="top" class="noprint"><p><span class="noscreen">Back on top</span> <a href="#header" title="Back on top ^">^<span></span></a></p></div>
        <hr class="noscreen" />
        
        <p id="createdby">creado por <a href="http://www.asodeco.org">PSC Asodeco</a> <!-- DON´T REMOVE, PLEASE! --></p>
        <p id="copyright">&copy; 2010 <a href="mailto:contacto@asodeco.org">Asodeco</a></p>
    </div> <!-- /footer -->

</div> <!-- /main -->

</body>
</html>
